import request from '@/config/axios'

export interface DictTypeVO {
  id?: number
  name: string
  type: string
  remark: string
  status: number
  createTime?: string
}

export const getDictTypeSimpleList = async () => {
  return await request.get({ url: '/system/dict-type/simple-list' })
}

export const getDictTypePage = async (params: PageParam) => {
  return await request.get({ url: '/system/dict-type/page', params })
}

export const getDictType = async (id: number) => {
  return await request.get({ url: '/system/dict-type/get', params: { id } })
}

export const createDictType = async (data: DictTypeVO) => {
  return await request.post({ url: '/system/dict-type/create', data: data })
}

export const updateDictType = async (data: DictTypeVO) => {
  return await request.post({ url: '/system/dict-type/update', data: data })
}

export const deleteDictType = async (id: number) => {
  return await request.delete({ url: '/system/dict-type/delete', params: { id } })
}

export const exportDictType = async (params: any) => {
  return await request.download({ url: '/system/dict-type/export', params })
}
